const path = require('path');

// 使用webpack直接对TS文件进行打包
module.exports = {
    entry: './index.ts',
    mode: "production",
    output: {
        filename: 'ts-utils.min.js',
        path: path.resolve(__dirname, 'dist'),
        library: {
            name: 'tsUtils',
            type: "this"
        }
    },
    module: {
        rules: [
            {
                test: /\.tsx?$/,
                loader: 'ts-loader',
                exclude: /node_modules/,
            }
        ]
    },
    resolve: {
        extensions: [ '.ts', '.tsx', '.js' ]
    }
};
